package com.yyh1;

public class School {
    //属性
    public String name;
    public int age;

    public School() {
    }

    public School(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    //行为
    //吃饭
    public void eat(){
        System.out.println("年龄为"+age+"的"+name+"正在吃饭");
    }
}
